Skip to content

Edit position page - #664

Open
NYABUTOA wants to merge 7 commits into
department-portal-basefrom
EDITPOSITIONPAGEA
Open

Edit position page#664
NYABUTOA wants to merge 7 commits into
department-portal-basefrom
EDITPOSITIONPAGEA

Conversation

@NYABUTOA

@NYABUTOA NYABUTOA commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Issue Description -

Added a Revise Position page for admins to edit a position's details and description.

Changes -

Added revisepositionpage.html, the new revise page. It's a form pre-filled with the position's title, WLS level, last revision date, revised-by, and all of its existing description sections so admins aren't starting from a blank page.
Added revisepositionpage.js so admins can add or remove description sections
Added revisepositionpage.css for the section-row and action-button styling the form needed that Bootstrap didn't already cover.
Added a link on the "Revise Position" button in managePositions.html so it takes you to the revise page for that exact position.

Screenshot 2026-08-04 at 4 48 05 PM

Test -

Went to Manage Positions and clicked "Revise Position" on a row, confirmed it opens the revise page and pulls in that position's title, code, WLS level, last revision date, revised-by, and its existing sections correctly.
Clicked "Add Section" a few times and confirmed each click adds a fresh, empty section row.
Clicked "Remove Section" and confirmed it only removes that one row, not the others.
Clicked "Cancel" and confirmed it takes you back to Manage Positions for the right department.
Reloaded the page to make sure the pre-filled data still shows up the same way.

… its going to work because its not going to be active its going to be pending so i need to work my way around it
…ition and make changes.these are the bones, html,css,and js
…ion so the revise position page actually works. Submitting the form now creates a new pending (Requested) revision of the position with updated title, WLS, and description sections.
Comment thread app/templates/main/managePositions.html
Comment thread app/controllers/main_routes/departmentPortal.py
Comment thread app/controllers/main_routes/departmentPortal.py
Comment thread app/controllers/main_routes/departmentPortal.py
transaction.rollback()


@pytest.mark.integration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests still create PositionHistory records with description="", but the model no longer has a description field and now requires revisedBy.

Can you update the tests to use revisedBy instead? Several creates in this file may fail because revisedBy is required and not provided.

Comment thread app/controllers/main_routes/main_routes.py
Comment thread app/logic/getPositions.py
… revision is immediately visible instead of redirecting back to a list that only shows Active positions.
revisionDate = None
if revisionDateParam:
try:
revisionDate = datetime.strptime(revisionDateParam, '%Y-%m-%d').date()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, when a section is added and saved, it works. But if the page is reloaded to check if it saves in the database, it breaks with an unexpected error. I believe it might be a routing issue or simply simply just an exception handler problem

position=position,
sections=sections
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure the WLS number entered should not be more than 6. until it gets revised to the new 1-3 system. currently, any number input is accepted, even if the number is a 10000 etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants